feat: support concurrent speakers in SelectorGroupChat#7388
Open
majiayu000 wants to merge 1 commit intomicrosoft:mainfrom
Open
feat: support concurrent speakers in SelectorGroupChat#7388majiayu000 wants to merge 1 commit intomicrosoft:mainfrom
majiayu000 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Closes microsoft#5395 Signed-off-by: majiayu000 <1835304752@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements concurrent speaker support for
SelectorGroupChatas outlined by @ekzhu in #5395:selector_funccan now returnstr | list[str] | None— returning a list selects multiple speakers to respond concurrentlymax_concurrent_speakersparameter (default 1) enables model-based multi-speaker selectionRequestToSpeakand must respond before the next selection roundallow_repeated_speaker=Falsenow correctly excludes all previous concurrent speakers from the next roundBackwards compatible: default behavior is unchanged (
max_concurrent_speakers=1,selector_funcreturningstr | None).Closes #5395
Changes
SelectorFuncTypesignatures to acceptstr | list[str] | Nonereturn typemax_concurrent_speakersparameter toSelectorGroupChatandSelectorGroupChatManager_select_multiple_speakers()method for model-based concurrent selection_previous_speaker: str | None→_previous_speakers: list[str]for correct exclusion trackingSelectorManagerStatewith backwards-compatibleprevious_speakersfieldsave_state/load_state) for backwards compatibility with existing stateSelectorGroupChatConfigand_to_config/_from_configfor declarative supportTest plan
test_selector_group_chat_concurrent_speakers_with_selector_func— selector_func returns["agent1", "agent2"]test_selector_group_chat_concurrent_speakers_with_model— model returns"agent1, agent2"withmax_concurrent_speakers=2